<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Server Process Start Time</title>
</head>
<body>
    <h1>Server Process Start Time</h1>
    <p id="start-time">Loading...</p>

    <script>
        function getStartTime() {
            fetch('http://127.0.0.1:5000/get_start_time')
            .then(response => response.json())
            .then(data => {
                document.getElementById('start-time').textContent = data.start_time;
            })
            .catch(error => {
                console.error('Error fetching start time:', error);
            });
        }

        // 每隔10秒更新一次
        setInterval(getStartTime, 10000);
        
        // 页面加载完成时获取一次启动时间
        window.onload = getStartTime;
    </script>
</body>
</html>
